package com.kongge.main;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.kongge.main.config.FunctionManager;

/**
 * Created by kongge on 2017/11/11.
 * description:
 * layoutid:
 */
public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView tvTest = (TextView) findViewById(R.id.tvTest);
        ImageView imgTest = (ImageView) findViewById(R.id.imgTest);
        Button btnTest = (Button) findViewById(R.id.btnTest);

        final TestClass testClass = new TestClass();
        testClass.setTextView(tvTest);
        testClass.setImageView(imgTest);

        btnTest.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                testClass.test(MainActivity.this);
            }
        });

        boolean isLogOpen = FunctionManager.getPropertyIsAllConfig(FunctionManager.IS_LOG_OPEN);
        Log.i("testLog", "isLogOpen=" + isLogOpen);
    }
}
